package com.legsem.jhosync.face;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * A marker to locate user implemented source code.
 * <p/>
 * Parameters are:
 * <ul>
 * <li><b>name</b>: Name used by clients to refer to this source</li>
 * <li><b>poll_interval</b>: Time between 2 refresh requests (in seconds,
 * default is 300)</li>
 * <li><b>partition_type</b>: Whether there is a master document for each user
 * or a shared one, default is PartitionType.USER)</li>
 * </ul>
 * 
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface JhosyncSource {

    /**
     * The name used by the client to refer to this source. This is a case
     * sensitive identifier.
     */
    String name();

    /** Default poll interval is 300 seconds (5 minutes). */
    int poll_interval() default 300;

    /** By default, there is master document for each user. */
    PartitionType partition_type() default PartitionType.USER;

}
